<html layout:decorator="public/form" xmlns:miguo="http://www.w3.org/1999/html">
<div layout:fragment="content">
  <form class="layui-form model-form" action="" style="width:80%;">
    <input name="id" type="hidden" th:value="${info['id']}?:0">
    <div class="layui-form-item">
      <div class="layui-inline">
        <label class="layui-form-label">名称：</label>
        <div class="layui-input-inline">
          <input name="name" th:value="${info['name']}" lay-verify="required" autocomplete="off" placeholder="请输入摊位名称" class="layui-input"
                 type="text">
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">地址：</label>
        <div class="layui-input-inline">
          <input name="address" th:value="${info['address']}" lay-verify="required" autocomplete="off" placeholder="请输入摊位地址" class="layui-input"
                 type="text">
        </div>
      </div>
    </div>
    <div class="layui-form-item">
      <div class="layui-inline">
        <label class="layui-form-label">可租赁时间：</label>
        <div class="layui-input-inline">
          <input type="text" name="period" class="layui-input" id="period" lay-verify="required" placeholder=" ~ " th:value="${info['period']}">
          <!--					<widget:singleSelect name="gender|1|性别|name|id" th:data="${USER_GENDER_LIST}" th:value="${info['gender']}?:3"/>-->
        </div>
      </div>
      <div class="layui-inline">
        <label class="layui-form-label">价格(元/天)：</label>
        <div class="layui-input-inline">
          <input name="price" th:value="${info['price']}" lay-verify="required" placeholder="请输入价格(元/天)" autocomplete="off" class="layui-input"
                 type="text">
        </div>
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">预览图片：</label>
      <div class="layui-input-block" style="margin-left: 130px;">
        <div class="layui-upload-drag">
          <a href="javascript:void(0);">
           <img id="image_preview" th:src="${info['image']} ? ${info['image']} : '/static/assets/images/default_upload.png'" alt="上传图片" width="90" height="90">
          </a>
          <input name="image"  type="hidden" th:value="${info['image']}?:''">
        </div>
        <div style="margin-top:10px;">
          <button type="button" class="layui-btn" id="upload">
            <i class="layui-icon"></i>上传图片
          </button>
        </div>
        <div class="layui-form-mid layui-word-aux">建议尺寸：建议上传尺寸450x450</div>
      </div>
    </div>
    <div class="layui-form-item" style="width: 625px;">
      <label class="layui-form-label">描述：</label>
      <div class="layui-input-block">
        <textarea name="description" placeholder="请输入摊位描述" class="layui-textarea" th:text="${info['description']}"></textarea>
      </div>
    </div>
    <div class="layui-form-item text-center model-form-footer">
      <button class="layui-btn" lay-filter="submitForm" lay-submit="">立即保存</button>
      <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">关闭</button>
    </div>
  </form>
</div>
</html>